/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved.
 */

import { FileUtil } from '../../utils/file-util.js';

import { NewSigningOptions } from './new-signing-options.js';

/**
 * 签名工具sdk-sign-tool的签名options
 *
 * @since 2024/05/11
 */
export class HarSigningOptions extends NewSigningOptions {
  sign() {
    this.commandList.push('sign-har');
    return this;
  }

  addAppCertFile(certPath: string) {
    FileUtil.checkPathLength(certPath);
    this.commandList.push('-signCertFile');
    this.commandList.push(certPath);
    return this;
  }
}
